<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<body>
    <th:block th:fragment="article-card(title,brief,avatar,username,date,views,preview,url)">
        <div class="ui segment grid stackable">
            <div class="ui five wide column">
                <a th:href="@{/article/{url}(url=${url})}">
                    <img th:src="@{/res/image/{img}(img=${preview})}" class="ui rounded image" alt="预览图"
                        style="height: 9em;">
                </a>
            </div>
            <div class="ui eleven wide column">
                <h3 class="ui header">[[${title}]]</h3>
                <p>[[${brief}]]</p>
                <div class="ui grid">
                    <div class="eleven wide column">
                        <!-- 作者信息 -->
                        <div class="ui horizontal link list">
                            <div class="item">
                                <img th:src="@{/res/image/{img}(img=${avatar})}" alt="" class="ui avatar image">
                                <div class="content"><a href="#" class="header">[[${username}]]</a></div>
                            </div>
                            <div class="item">
                                <i class="calendar icon"></i>[[${date}]]
                            </div>
                            <div class="item">
                                <i class="eye icon"></i>[[${views}]]
                            </div>
                        </div>
                    </div>
                    <div class="five wide column">
                        <a th:href="@{/article/{url}(url=${url})}" class="ui label teal">阅读原文</a>
                    </div>
                </div>
            </div>
        </div>
    </th:block>

    <div th:fragment="head-card(name,num,unit)" class="ui two column grid">
        <div class="column">
            <h3 class="ui teal header">[[${name}]]</h3>
        </div>
        <div class="right aligned column">
            共 <span class="ui orange header">[[${num}]]</span>[[${unit}]]
        </div>
    </div>

</body>

</html>